/////////////////////////////////////////////////////////////////////////////
// Name:        addonswizard.h
// Purpose:     
// Author:      Brant Young
// Modified by: 
// Created:     Sun Jul 22 16:16:30 2007
// RCS-ID:      
// Copyright:   (C) Victsoft 2007
// Licence:     GPL 2.0
/////////////////////////////////////////////////////////////////////////////

#ifndef _ADDONSWIZARD_H_
#define _ADDONSWIZARD_H_

#include <wx/html/htmlwin.h>
#include "component/wizardex.h"


class InstallAddonsWizard: public DaoWizard
{

public:
    InstallAddonsWizard( wxWindow* parent, wxWindowID id = ID_INSTALL_ADDONS_WIZARD, const wxPoint& pos = wxDefaultPosition );

    /// Destructor
    virtual ~InstallAddonsWizard();

    /// Creates the controls and sizers
    void CreateControls();

    /// Runs the wizard
    bool run();

////@begin InstallAddonsWizard member variables
    wxWizardPageSimple* p_location_wizardpg;
    wxWizardPageSimple* p_progress_wizardpg;
    wxWizardPageSimple* p_installed_wizardpg;
    wxWizardPageSimple* p_failed_wizardpg;
    /// Control identifiers
    enum {
        ID_INSTALL_ADDONS_WIZARD = 10045,
        
        ID_INSTALLED_WIZARDPG,
        ID_EXIT_WIZARD_RBTN,
        ID_RESTART_DAODICT_RBTN,
        ID_INSTALL_MORE_RBTN,

        ID_LOCATION_WIZARDPG,
        ID_ADDON_ZIP_TEXT,
        ID_BROWSE_BTN,
        ID_USER_HOME_RBTN,
        ID_GLOBAL_DIR_RBTN,

        ID_PROGRESS_WIZARDPG,
        ID_INSTALLING_GAUGE,
        
        ID_FAILED_WIZARDPG,
        ID_F_EXIT_WIZARD_RBTN,
        ID_F_INSTALL_MORE_RBTN
    };
////@end InstallAddonsWizard member variables
    
////@begin InstalledWizardPage member variables
    wxTextCtrl* p_addon_file_text;
    wxButton* p_browse_btn;
    wxStaticText* p_file_exist_stc;

    wxGauge* p_installing_gauge;
    wxStaticText* p_installing_stc;

    wxRadioButton* p_exit_wizard_rbtn;
    wxRadioButton* p_restart_daodict_rbtn;
    wxRadioButton* p_install_more_rbtn;
    
    wxRadioButton* p_f_exit_wizard_rbtn;
    wxRadioButton* p_f_install_more_rbtn;
    
////@end InstalledWizardPage member variables
    
    void OnBrowseAddon(wxCommandEvent& event);
    void OnPageChanging(wxWizardEvent& event);
    void OnPageChanged(wxWizardEvent& event);
    
protected:
	void InitEvents();

	static void* _install_addon_taskfunc(void* data);
};

#endif
    // _ADDONSWIZARD_H_
